/**  
* @Title: MtonsMusicVO.java
* @Package cn.net.mtons.weixin.reply.vo
* @Description: TODO
* @author ma jinjian  
* @date 2016年2月7日 下午5:09:20
* @version V1.0  
*/ 
package cn.net.mtons.weixin.rpl.vo;

import java.util.HashMap;
import java.util.Map;

import cn.net.mtons.weixin.MtonsBasicVO;
import cn.net.mtons.weixin.utils.MtonsMessageUtil;

/**
 * @ClassName: MtonsMusicVO
 * @Description: TODO
 * @author ma jinjian
 * @date 2016年2月7日 下午5:09:20
 *
 */
public class MtonsMusicVO extends MtonsBasicVO {

	private String msgType;		//消息类型
	
	private String title;	    //音乐标题
	
	private String description; //音乐描述
	
	private String musicUrl;	//音乐链接
	
	private String hQMusicUrl;	//高质量音乐链接
	
	private String thumbMediaId;//缩略图的mediaid

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getMusicUrl() {
		return musicUrl;
	}

	public void setMusicUrl(String musicUrl) {
		this.musicUrl = musicUrl;
	}

	public String gethQMusicUrl() {
		return hQMusicUrl;
	}

	public void sethQMusicUrl(String hQMusicUrl) {
		this.hQMusicUrl = hQMusicUrl;
	}

	public String getThumbMediaId() {
		return thumbMediaId;
	}

	public void setThumbMediaId(String thumbMediaId) {
		this.thumbMediaId = thumbMediaId;
	}

	@Override
	public String toXml() {
		MtonsMessageUtil util = new MtonsMessageUtil(super.toXml());
		util.addData("MsgType", "music");
		Map<String, String> map = new HashMap<String, String>();
		map.put("Title", this.getTitle());
		map.put("Description", this.getDescription());
		map.put("MusicUrl", this.getMusicUrl());
		map.put("HQMusicUrl", this.gethQMusicUrl());
		map.put("ThumbMediaId", this.getThumbMediaId());
		util.addData("Music", map);
		util.surroundWith("xml");
		return util.toString();
	}
	
	public static void main(String[] args) {
		MtonsMusicVO vo = new MtonsMusicVO();
		vo.setFromUserName("majinjian");
		vo.setToUserName("liujiao");
		vo.setDescription("测测");
		vo.sethQMusicUrl("http://baidu.com");
		vo.setMusicUrl("http://www.baidu.com");
		vo.setThumbMediaId("12545685656");
		vo.setTitle("我爱你");
		System.out.println(vo.toXml());
	}
}
